﻿using System;
using System.Data.OleDb;
using System.Data;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.IO;
using System.Text;
using System.Collections;


public partial class Crm_Channel_Edit : Page
{
    List<Dukey.Model.Channel> listboard = BLL.Channel.instance.GetList("");
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {          
        }
    }

    protected void btnSubmit_Click(object sender, EventArgs e)
    {       
        //Hashtable hs = new Hashtable();
        //hs.Add("title", model.title);
        //hs.Add("brief", model.brief);
        //hs.Add("contents", model.contents);
        //hs.Add("bid", model.bid);
        //hs.Add("isshow", model.isshow);
        //hs.Add("addtime", model.addtime);
        //hs.Add("picurl", model.picurl);
        //if (!StringHelper.isNum(Request.QueryString["id"]))//插入新纪录
        //{
        //    BLL.DataBaseHelper.instance.Insert(hs, "Article");  
        //    txtTitle.Text = "";
        //txtBrief.Text = "";
        //txtContent.Value = "";
        //Common.MessageBox.Show(this, "发布成功,你可以继续发布下一篇!");
        //}
        //else//更新纪录
        //{
        //    model.id = int.Parse(Request.QueryString["id"]);            
        //    BLL.DataBaseHelper.instance.Update(hs, "Article", "[id]=" + model.id);
        //    Common.MessageBox.ShowAndRedirect(this, "修改成功!","ArticleList.aspx");
        //}        
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        
    }
    protected void btnDelete_Click(object sender, EventArgs e)
    {
        BLL.DataBaseHelper.instance.Delete("Article", "id=" + Request.QueryString["id"]);
        Response.Redirect("articlelist.aspx");
    }  
}
